package com.zsc.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zsc.entity.OrderDetail;
import com.zsc.mapper.OrderDetailMapper;
import com.zsc.service.OrderDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author cjr165123050
 * @description 针对表【order_detail(订单明细表)】的数据库操作Service实现
 * @createDate 2024-05-19 11:13:53
 */
@Service
public class OrderDetailServiceImpl extends ServiceImpl<OrderDetailMapper, OrderDetail> implements OrderDetailService {


    @Autowired
    private OrderDetailMapper orderDetailMapper;

    @Override
    public void removeByOrderId(Long orderId) {
        QueryWrapper<OrderDetail> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("order_id", orderId);
        orderDetailMapper.delete(queryWrapper);
    }
}




